

import 'dart:collection';

import 'package:huajianshe_app/network/response/BaseResp.dart';
import 'package:json_annotation/json_annotation.dart';

part 'ContactsModel.g.dart';

@JsonSerializable()
class ContactListResp extends BaseResp { // 首页圈子列表
  List<ContactListData>? data;

  ContactListResp();

  factory ContactListResp.fromJson(Map<String, dynamic> json) => _$ContactListRespFromJson(json);

  @override
  ContactListResp parseFromMap(Map<String, dynamic> map) {
    return ContactListResp.fromJson(map);
  }
}

@JsonSerializable()
class ContactListData {

  String? initial;
  List<ContactInfo>? data;

  ContactListData();

  factory ContactListData.fromJson(Map<String, dynamic> json) => _$ContactListDataFromJson(json);
}

@JsonSerializable()
class ContactInfo {
  int? id;
  String? title;
  String? desc;
  @JsonKey(name: 'cover_url')
  String? cover;
  String? initials;
  @JsonKey(ignore: true)
  bool? checked;
  @JsonKey(ignore: true)
  bool? showRadio;

  ContactInfo();

  factory ContactInfo.fromJson(Map<String, dynamic> json) => _$ContactInfoFromJson(json);
}